package com.itheima.mapper;

import com.itheima.entity.SysConfig;
import com.itheima.vo.ConfigVO2;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface ConfigMapper {
    @Select("select * from sys_config where group_value = #{groupValueName}")
    List<SysConfig> selectByGroupValue(String groupValueName);
    @Select("select * from sys_config")
    List<SysConfig> selectAllData();


    List<HashMap<String, String>> selectConfig();

    @Select("select validator from sys_config where attr_key = 'site_name'")
    String selectValidatorBySiteName();

    @Select("select attr_value from sys_config")
    List<String> selectValue();
}
